;; EX-48.scm - Aleatoric Quartet (JMcC)

(let* ((amp 0.4)
       (density (MouseX.kr 0.01 1))
       (dmul (Mul (Recip density) 0.5 amp))
       (dadd (Add (Neg dmul) amp))
       (signal (Mix 
		(tabulate 
		 4 (lambda (i)
		     (let ((excitation (PinkNoise.ar 
					(Max 0 (LFNoise1.kr 8 dmul dadd))))
			   (freq (MIDICPS 
				  (Lag.kr 
				   (Round 
				    (LFNoise0.kr (random '(1 0.5 0.25)) 
						 7 
						 (+ 66 (random -30 30))) 
				    1) 
				   0.2))))
		       (Pan2.ar	(CombL.ar excitation 0.02 (Recip freq) 3) 
				(random -1 1))))))))
  (iter 5 (lambda () 
	    (set! signal (AllpassN.ar signal 0.05 (random-list 2 0.05) 1))))
  (LeakDC.ar signal 0.995))
